<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-jmeterNode-edit" th:object="${jmeterNode}">
            <input id="id" name="id" th:field="*{id}"  type="hidden">
			<div class="form-group">	
				<label class="col-sm-3 control-label">子节点名称：</label>
				<div class="col-sm-8">
					<input id="node_Name" th:value="*{nodeName}" class="form-control" type="text">
				</div>
			</div>
<!--			<div class="form-group">	-->
<!--				<label class="col-sm-3 control-label">节点端口：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input disabled id="nodePort" name="nodePort" th:field="*{nodePort}" class="form-control" type="text">-->
<!--				</div>-->
<!--			</div>-->
			<div class="form-group">	
				<label class="col-sm-3 control-label">ip地址：</label>
				<div class="col-sm-8">
					<input disabled id="ip" name="ip" th:field="*{ip}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">Jmeter链接端口号：</label>
				<div class="col-sm-8">
					<input disabled id="jmeterPort" name="jmeterPort" th:field="*{jmeterPort}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">节点机用户名：</label>
				<div class="col-sm-8">
					<input id="userName" name="userName" th:field="*{userName}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">节点机密码：</label>
				<div class="col-sm-8">
					<input id="passwd" name="passwd" th:field="*{passwd}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">最大并发数：</label>
				<div class="col-sm-8">
					<input id="maxConcurrency" name="maxConcurrency" th:field="*{maxConcurrency}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">cpu：</label>
				<div class="col-sm-8">
					<input id="cpu" name="cpu" th:field="*{cpu}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">内存 单位g：</label>
				<div class="col-sm-8">
					<input id="memory" name="memory" th:field="*{memory}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">磁盘 单位g ：</label>
				<div class="col-sm-8">
					<input id="disk" name="disk" th:field="*{disk}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">io：</label>
				<div class="col-sm-8">
					<input id="io" name="io" th:field="*{io}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">linux | windows：</label>
				<div class="col-sm-8">
					<select id="os" name="os" class="form-control m-b" >
						<option value="windows">windows</option>
						<option value="linux" >linux</option>
					</select>
				</div>
			</div>
			<div class="form-group" >
				<label class="col-sm-3 control-label">节点的Jmeter路径：</label>
				<div class="col-sm-8">
					<input disabled id="homeDir" name="homeDir" th:field="*{homeDir}" class="form-control" type="text">
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
	<script th:src="@{/ajax/libs/select/select2.js}"></script>
	<script type="text/javascript">

		var prefix = ctx + "jmeter/jmeterNode"
		$("#form-jmeterNode-edit").validate({
			rules:{
				homeDir:{
					required:true,
				},
			},

			messages: {
				homeDir:  "Jmeter目录不能为空"
			}
		});

		function submitHandler() {
			if ($.validate.form()) {
				var values = $("#form-jmeterNode-edit").serializeArray();
				values.push({
					name: "nodeName",
					value: $("#node_Name").val().trim()
				});
				values = jQuery.param(values);

				$.operate.save(prefix + "/edit", values);
			}
		}
	</script>
</body>
</html>
